<?php
declare (strict_types = 1);

namespace app\validate;

use think\Validate;

class Group extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'	=>	['规则1','规则2'...]
     *
     * @var array
     */	
	protected $rule = [
        'uid'=>'require',
        'group_id'=>'require'
    ];
    
    /**
     * 定义错误信息
     * 格式：'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */	
    protected $message = [
        'uid.require'=>'uid必须是传值',
        'group_id.require'=>'群组ID必须的',
    ];


    protected $scene = [
        'join'=>['uid','group_id'],
        'ungroup'=>['group_id'],
        'count'=>['group_id'],
        'user'=>['group_id'],
    ];
}
